package com.example.assetmanagement.mapper;

import com.example.assetmanagement.domain.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CategoryMapper {

    List<Category> selectPage(@Param("offset") int offset,
                              @Param("limit") int limit,
                              @Param("name") String name);

    long count(@Param("name") String name);

    Category selectById(@Param("id") Long id);

    int insert(Category category);

    int update(Category category);

    int deleteById(@Param("id") Long id);

    int deleteBatch(@Param("ids") List<Long> ids);

    List<Category> selectAll();
} 